/*
 * SleepingAlgo is used in order to manage the different sleeping algorithm
 * used by the sensor
 *
 * @created 2007-04-17
 * @author csamson
 * 
 *
 */

package sleeping;
import java.io.Serializable;
import java.awt.event.*;
import java.awt.*;
import kernel.Simulator;
import objects.*;


public abstract class SleepingAlgo{

    //The targeted sensorNetwork
    protected SensorNetwork _sn;
    //The number of sleeping sensor
    protected int _nbAsleep;
	
	
    public SleepingAlgo (){
    }


    /**
     * @param s the targeted SensorNetwork
     */
    public void setSensorNetwork(SensorNetwork s){
	_sn = s;
    }

    /**
     * @return the number of sleeping sensor
     */
    public int getNbAsleep(){
	return _nbAsleep;
    }

    /**
     * @return the algorithm name
     */
    public abstract String getName();
    
    
    /**
     * Calculates the sleeping for a SensorNetwork
     *
     */
    public abstract void calculateSleeping();
    
}
